<?php

/**
 * Author: ryu
 *
 * @email:    mo5467@126.com
 * @date:     2020-04-22 00:02:19
 * @lastTime: 2020-04-25 23:23:36
 */

namespace Design\Creational\Singleton;

class Singleton
{

    private static $instance = null;


    private function __construct()
    {

    }//end __construct()


    public static function getInstance()
    {
        if (self::$instance === null) {
            self::$instance = new static();
        }

        return self::$instance;

    }//end getInstance()

    /**
     * Undocumented function
     * @codeCoverageIgnore
     * @return void
     */
    private function __clone()
    {

    }//end __clone()

    /**
     * Undocumented function
     * @codeCoverageIgnore
     * @return void
     */
    private function __wakeup()
    {

    }//end __wakeup()


}//end class
